package com.zx.ishopping.controller.User;

import com.zx.ishopping.entity.Address;
import com.zx.ishopping.entity.Cart;
import com.zx.ishopping.results.Result;
import com.zx.ishopping.services.CartService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 购物车模块开发
 */
@RestController
@RequestMapping("/user/cart")
public class CartController {
    
    @Autowired
    private CartService cartService;


    /**
     * 获取购物车信息
     * @return
     */
    @GetMapping("/getCart")
    public Result<Cart> getCart(){
        Cart cart= cartService.getCart();
        return Result.success(cart);
    }

   
    
}
